<script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator'

@Component({ name: 'com-badge' })
export default class ComBadge extends Vue {
  @Prop({ type: Number, required: true })
  num: number
}
</script>
<template>
  <sup class="com-badge">
    {{num}}
  </sup>
</template>
<style lang="less">
@import '../../styles/variable.less';

.com-badge {
  position: relative;
  border-radius: 4px;
  padding: 0 3px;
  line-height: 1;
  color: white;
  background-color: @color-primary;
  font-size: 10px;
  margin-right: -3px;
  margin-left: -8px;
}
</style>
